
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="../common/CheckLoginBackend.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link type="text/css" rel="stylesheet" href="../statics/css/style.css" />
<script type="text/javascript" src="../statics/js/jquery.js"></script>
	<title>二组牛逼</title>
</head>
<body>
	<%@include file="../common/Admin_Header.jsp"%>
	<div class="i_bg bg_color">
		<!--Begin 用户中心 Begin -->
		<div class="m_content">

			<%@include file="../common/Admin_left.jsp"%>

			<div class="m_right" id="content">
				<!-- 判断修改/添加 -->
				<c:if test="${productCategory==null }">
					<div class="mem_tit">添加分类</div>
				</c:if>
				<c:if test="${productCategory!=null }">
					<div class="mem_tit">修改分类</div>
				</c:if>
				<br />
				<form action="CategoryListServlet?action=add1" method="post">
					<!-- 根据隐藏域内ID进入Servlet判断执行新增或修改 -->
					<!-- ******************注意 Value内不要添加空格或者换行/得到的字符串使用trim()处理 会导致字符串格式化异常***************** -->
					<input type="hidden"
						value="
					<c:if test="${productCategory!=null}">${productCategory.id}</c:if>
					<c:if test="${productCategory==null}">0</c:if>"
						name="id" />
					<table border="0" class="add_tab" style="width:930px;"
						cellspacing="0" cellpadding="0">
						<tr>
							<td width="5%">一级分类名称</td>
							<td width="10%"><input type="text"
								value="<c:if test="${productCategory!=null}">${productCategory.name}</c:if>"
								name="name" required /></td>
						</tr>
						<tr>
							<td></td>
							<!-- 根据requestScope中是否存在数据进入Servlet判断执行新增或修改 -->
							<td><c:if test="${productCategory==null }">
									<input type="submit" value="添加分类" class="s_btn" />
								</c:if> <c:if test="${productCategory!=null }">
									<input type="submit" value="确定修改" class="s_btn" />
								</c:if></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</body>
</html>